home *** CD-ROM | disk | FTP | other *** search
/ Practical Algorithms for Image Analysis / Practical Algorithms for Image Analysis.iso / TARFILE.GZ / tarfile / libtiff / contrib / mac-cw / metrowerks.note < prev    next >
Encoding:
Text File  |  1999-09-11  |  3.2 KB  |  85 lines

  1. ----------------------------------------------------
  2. Build instructions for LIBTIFF - CodeWarrior (6.1):
  3. ----------------------------------------------------
  4.  
  5. Note: there is a bug in CW earlier than 6.1 which will generate
  6. 16-bit offset link errors for any projects using libtiff; you must
  7. download the CodeWarrior 6.1 patch located at:
  8.  
  9.   ftp://ftp.metrowerks.com/pub/updates/metro-patches-61.hqx
  10.  
  11. unpack the archive, insert the files and recompile the libraries
  12. using the AppleScript provided.
  13.  
  14.  
  15. 1. Make sure that the directory containing these files is under
  16.    the "contrib" directory of the tiff folder; otherwise, some
  17.    access path preferences will need to be updated.
  18.  
  19. 2. The instructions below are for the 68k platform build. 
  20.     A similar script can be put together for the PPC version,
  21.     or you can just directly convert the projects. Be sure to
  22.    use the native libraries as well. NOTE: if anyone cooks  
  23.   up an equivalent script for PPC, send it to me and I'll include
  24.   it with the rest of the package.
  25.  
  26. 3.   Open the file Makefile.script with an AppleScript Editor
  27.    and change the PATHNAME variable to point to your
  28.    top-level TIFF directory
  29.  
  30. 4. Run the Script. It will do the following things:
  31.  
  32.    4a. Prompt you for the current location of the CodeWarrior 68K
  33.    program.
  34.  
  35.    4b. Create the source file "tif_fax3sm.c":
  36.  
  37.         i) Build the project CW project mkg3states.cw. It will
  38.      produce a small program called mkg3states. Only a
  39.      68k version is provided, since you only have to run
  40.      this code once, and it only takes a few seconds.
  41.      
  42.         ii) Run the built mkg3states program: 
  43.         
  44.     The program will temporarily take over ALL of the CPU, so
  45.     don't panic. After a few seconds it will produce a file called
  46.     "tif_fax3sm.c".
  47.  
  48.   4c. Build the library project libtiff-68K.mw, producing library
  49.    called libtiff-68K.
  50.  
  51.   4d. Build program project tiffinfo.mw; it will produce a
  52.    program called tiffinfo, which can dump the tiff tags of
  53.    a named file. Passing in no arguments will dump a help file
  54.    for the program. It is unix-flavored, but hey, it works.
  55.  
  56. 5  When the script finishes, you will have a usable libtiff-68K
  57.    library, a passable "tiffinfo" program, and the projects used
  58.    to build them. Note that to get tiffinfo to work I have put 
  59.    an include file in the project that redefines main(), and
  60.    then have a mac_main.c program that calls ccommand() first
  61.    and passes that to the actual main code. A real mac app,
  62.    of course, would never use this stuff at all...
  63.  
  64.  . The tiffinfo.mw project may be used as a template to build
  65.    most of the other libtiff tools, or your own code. When
  66.    modifying a copy of the project, you will most likely need
  67.    to update the "Access Paths" directory if it is moved out of
  68.    the contrib folder.
  69.    
  70. 6. If you are going to create a project from scratch, be sure
  71.    to set up the preferences with 
  72.    
  73.       4-byte ints
  74.       8-byte doubles
  75.       Far Code/Far Data
  76.       Large Linking model
  77.       
  78.    and everything should work fine. If the console-style error
  79.    reports bother you, you can always override the error and
  80.    warning mechanism with TIFFSetErrorHandler to do something
  81.    more Mac-like.
  82.  
  83. Questions, comments to Niles Ritter (ndr@tazboy.jpl.nasa.gov).
  84.  
  85.